//
//  IntrospectionGuide.swift
//  HIextractLicve
//
//  Created by HIextractLicve on 2024/12/3.
//

import UIKit

class IntrospectionGuide: UIViewController {
    var mindfulness:Set<Int>?
    var suggestion:Set<String>?
    var  professionals:Set<CGFloat>?
    var exchangeHTLC:[String:Array<Dictionary<String,String>>]?

    var HtlPoiu:Int
    init(stressdescHTL:Set<Int>,HtlPoiu: Int) {
        self.HtlPoiu = HtlPoiu
        super.init(nibName: nil, bundle: nil)
        mindfulness = stressdescHTL
        suggestion = ["decompression"]
        professionals = [12.1]
        exchangeHTLC = ["themtopicHTLC":[["decompression":"098"]]]
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    @IBOutlet weak var elaijgBGHTl: UIView!
    
    @IBOutlet weak var tingTitleHTL: UILabel!
    
    
    @IBOutlet weak var mindesvHTl: UITextView!
    
    @IBOutlet weak var cancelButonHTl: UIButton!
    
    
    @IBOutlet weak var agreenButonHTl: UIButton!
    
    
    
    @IBOutlet weak var privacyHTL: UIButton!
    
    @IBOutlet weak var termHRL: UIButton!
    
    var eachVioViewHTLC:THLCNOrBUTTOn?
    var mindfulnessPageHTL:THLCNPageControll?
    var journeyHTLC:UIView?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        cancelButonHTl.layer.cornerRadius = 24
        cancelButonHTl.layer.masksToBounds = true
        
        agreenButonHTl.layer.cornerRadius = 24
        agreenButonHTl.layer.masksToBounds = true
        
        
        
        elaijgBGHTl.layer.cornerRadius = 20
        elaijgBGHTl.layer.masksToBounds = true
        if self.navigationController?.navigationBar.isHidden == true {
            journeyHTLC?.alpha = 1
            journeyHTLC?.layer.cornerRadius = 12
        }
        journeyHTLC?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)

        eachVioViewHTLC = THLCNOrBUTTOn.init()
        eachVioViewHTLC?.setTitle("anchors", for: .normal)
        if journeyHTLC != nil {
            journeyHTLC?.addSubview(eachVioViewHTLC ?? THLCNOrBUTTOn.init())
            view.addSubview(journeyHTLC!)
        }

        mindfulnessPageHTL = THLCNPageControll()
        mindfulnessPageHTL?.numberOfPages = 1
        mindfulnessPageHTL?.backgroundColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.tintColor = UIColor(red: 0.06, green: 0.07, blue: 0.07, alpha: 0.01)
        mindfulnessPageHTL?.sizeToFit()

        if journeyHTLC != nil {
            journeyHTLC?.addSubview(mindfulnessPageHTL ?? THLCNPageControll.init())
           
        }

        switch HtlPoiu {
        case 0:
            var hahah = Int.random(in: 100...1000)
            hahah = hahah*2
            
            hahah -= 2
            
            if hahah < 20 {
                return
            }
            tingTitleHTL.text =  "Hilfy ELUA"
            mindesvHTl.text = """
This End User License Agreement (hereinafter referred to as the "Agreement") is a legal agreement between you (hereinafter referred to as the "User") and Hilfy (hereinafter referred to as the "Company") for the use of the Hilfy decompression live broadcast app (hereinafter referred to as the "App"). By installing, copying, or otherwise using the App, you agree to be bound by the terms of this Agreement.

License Grant
The Company grants you a non-exclusive, non-transferable license to use the App on a single device solely for personal, non-commercial purposes. You may not copy, modify, distribute, sell, lease, rent, or transfer the App or any part of it.

Intellectual Property
The App and all content included in or made available through the App, such as text, graphics, logos, button icons, images, audio clips, digital downloads, data compilations, and software, are the property of the Company or its licensors and are protected by United States and international copyright laws.

Terms of Use
You agree to use the App in accordance with all applicable laws and regulations. You may not use the App for any illegal or unauthorized purpose. The Company reserves the right to terminate your access to the App if it believes you have violated any term of this Agreement.

Updates and Modifications
The Company may, from time to time, release updates or modifications to the App. You agree to accept such updates or modifications as a condition of your continued use of the App.

Termination
This Agreement will terminate automatically if you fail to comply with its terms and conditions. The Company may also terminate this Agreement at any time, with or without cause, by providing notice to you. Upon termination, you must uninstall the App and delete all copies of it from your device.

Governing Law
This Agreement shall be governed by and construed in accordance with the laws of the State of [Insert State], without regard to its conflict of law principles.

By using the Hilfy app, you agree to the terms of this EULA, Terms of Service, and Privacy Policy. If you have any questions or concerns about these agreements, please contact us at Hilfy99826@gmail.com.
"""
        case 1:
            var hahah = Int.random(in: 100...1000)
            hahah = hahah*2
            
            hahah -= 2
            
            if hahah < 20 {
                return
            }
            tingTitleHTL.text =  "Hilfy Privacy service"
            mindesvHTl.text = """
Hilfy is committed to protecting your privacy. This Privacy Policy explains how we collect, use, and disclose your personal information when you use our services.

Information Collection
We may collect personal information from you when you create an account, use our services, or interact with us through other means. This information may include your name, email address, phone number, and other information you choose to provide to us.

Information Use
We may use your personal information to provide you with our services, improve our services, communicate with you, and for other purposes as described in this Privacy Policy. We will not sell or rent your personal information to third parties.

Information Disclosure
We may disclose your personal information to third parties in certain circumstances, such as when we are required to do so by law, or when we believe it is necessary to protect our rights or the rights of others. We may also share your personal information with our service providers and partners who help us provide our services.

Security
We take reasonable steps to protect your personal information from unauthorized access, use, or disclosure. However, no security measures are perfect, and we cannot guarantee the absolute security of your personal information.

Changes to Privacy Policy
We may update this Privacy Policy from time to time. When we make significant changes to the Privacy Policy, we will notify you through our services or by other means. Your continued use of our services after we make changes to the Privacy Policy constitutes your acceptance of the revised Privacy Policy.
"""
            privacyHTL.isHidden = true
            termHRL.isHidden = true
        case 2:
            tingTitleHTL.text =  "Hilfy Terms of use"
            mindesvHTl.text = """
Welcome to Hilfy! By accessing or using our services, you agree to be bound by the following terms and conditions (hereinafter referred to as the "Terms of Service"). Please read them carefully before using our services.

Account Eligibility
You must be at least 18 years old to use our services. By using our services, you represent and warrant that you are of legal age to form a binding contract with us.

User Conduct
You agree to use our services in a manner that is legal, respectful, and in accordance with all applicable laws and regulations. You may not use our services to transmit any illegal, harmful, threatening, abusive, harassing, defamatory, vulgar, obscene, or otherwise objectionable material.

Content Ownership
You retain ownership of any content you create and share through our services. However, by posting content on our platform, you grant us a non-exclusive, royalty-free license to use, copy, distribute, and display such content for the purposes of providing our services.

Privacy Policy
We respect your privacy and will handle your personal information in accordance with our Privacy Policy. By using our services, you agree to the terms of our Privacy Policy.

Termination
We may terminate your access to our services at any time, with or without cause, by providing notice to you. Upon termination, you will no longer have access to your account or any content you have created or shared through our services.
"""
            privacyHTL.isHidden = true
            termHRL.isHidden = true
        default:
            break
        }
        
        
    }


    @IBAction func priavseHTLCLick(_ sender: UIButton) {
      
        self.navigationController?.pushViewController(IntrospectionGuide.init(stressdescHTL: [56,66,55], HtlPoiu: 1), animated: true)
    }
    
    
    
    @IBAction func termvseHTLCLick(_ sender: UIButton) {
       
        self.navigationController?.pushViewController(IntrospectionGuide.init(stressdescHTL: [56,77,99], HtlPoiu: 2), animated: true)
    }
    
    @IBAction func cancelHTLCLick(_ sender: UIButton) {
        self.navigationController?.popViewController(animated: true)
    }
    
    
    @IBAction func agreenHTLCLick(_ sender: UIButton) {
      
       
        if self.HtlPoiu == 0 {
            ConsciousBreathing.agreenELUHTL = true
            self.navigationController?.popViewController(animated: true)
            return
        }
        
        
            self.navigationController?.popViewController(animated: true)
        
        
    }
    
    
}
